package com.bh.order.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.bh.common.annotation.Excel;
import com.bh.common.enums.YesOrNo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * 订单对象 jc_order
 *
 * @author slx
 * @date 2023-04-22
 */
@Data
public class JcOrderQueryDto {

    private Long id;

    private Integer status;

    private String statuses;

    private String createName;

    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String modifyName;
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;

    @Excel(name = "名称")
    private String name;

    @Excel(name = "代码")
    private String code;

    private Set<Long> orderIds;

    /**
     * 合同是否超期
     */
    @Excel(name = "合同是否超期")
    private Integer customerIsExceed;

    /**
     * 客户名称(零散客户)
     */
    @Excel(name = "客户名称(零散客户)")
    private String customerName;

    /**
     * 客户类型  0:零散，1:合同
     */
    @Excel(name = "客户类型  0:零散，1:合同")
    private Integer customerType;

    /**
     * 结算方式
     */
    @Excel(name = "结算方式")
    private Integer feeType;

    /**
     * 实际发运时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date fyTime;

    /**
     * 交付方式
     */
    @Excel(name = "交付方式")
    private Integer handoverType;

    /**
     * 是否有异常
     */
    @Excel(name = "是否有异常")
    private Integer isAbnormal;

    /**
     * 是否回单
     */
    @Excel(name = "是否回单")
    private Integer isBack;


    private Integer isBilling;

    /**
     * 件数
     */
    @Excel(name = "件数")
    private Integer number;

    /**
     * 订单公里数
     */
    @Excel(name = "订单公里数")
    private Double orderMileage;

    /**
     * 客户订单号1
     */
    @Excel(name = "客户订单号1")
    private String relateBill1;

    /**
     * 客户订单号2
     */
    @Excel(name = "客户订单号2")
    private String relateBill2;

    /**
     * 客户订单号3
     */
    @Excel(name = "客户订单号3")
    private String relateBill3;

    /**
     * 客户订单号4
     */
    @Excel(name = "客户订单号4")
    private String relateBill4;

    /**
     * 客户订单号5
     */
    @Excel(name = "客户订单号5")
    private String relateBill5;

    /**
     * 销售负责人
     */
    @Excel(name = "销售负责人")
    private String salePerson;

    /**
     * 运输方式
     */
    @Excel(name = "运输方式")
    private Integer shipmentMethod;

    /**
     * 订单日期
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date time;

    /**
     * 运输性质
     */
    private Integer transportPro;


    /**
     * 核销时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date ydTime;

    /**
     * 客户
     */
    @Excel(name = "客户")
    private Long jcCustomerId;

    /**
     * 组织机构(出发网点)
     */
    @Excel(name = "组织机构(出发网点)")
    private Long jcOrganizationId;

    /**
     * 派车单
     */
    @Excel(name = "派车单")
    private Long jcDispatchId;

    /**
     * 实际到达时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际到达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date factArriveTime;

    /**
     * 实际发运时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实际发运时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date factLeaveTime;

    /**
     * 要求到达时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
    @Excel(name = "要求到达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planArriveTime;

    /**
     * 要求发运时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "要求发运时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planLeaveTime;

    /**
     * 起运站
     */
    @Excel(name = "起运站")
    private Long jcFromOrganizationId;

    /**
     * 目的站
     */
    @Excel(name = "目的站")
    private Long jcToOrganizationId;

    /**
     * 核销类型
     */
    @Excel(name = "核销类型")
    private Long hxType;

    /**
     * 库分区
     */
    @Excel(name = "库分区")
    private Long jcZoneStoreroomId;

    /**
     * 目的运点
     */
    @Excel(name = "目的运点")
    private Long jcEndZoneId;

    /**
     * 出发运点
     */
    @Excel(name = "出发运点")
    private Long jcStartZoneId;

    /**
     * 是否有拆单(0否,1是)
     */
    @Excel(name = "是否有拆单(0否,1是)")
    private Integer isTake;

    /**
     * 代收货款
     */
    @Excel(name = "代收货款")
    private Long agent;

    /**
     * 签收时间
     */
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "签收时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date qsTime;

    /**
     * 签收人
     */
    @Excel(name = "签收人")
    private String qsPerson;

    /**
     * 预录单ID
     */
    @Excel(name = "预录单ID")
    private Long jcPrescoId;

    /**
     * 计算方式
     */
    @Excel(name = "计算方式")
    private Integer jsType;

    /**
     * 是否收入成本确认
     */
    @Excel(name = "是否收入成本确认")
    private Integer isConfirm;

    /** 请求参数 */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();

    // 核查状态
    private YesOrNo recheckStatus;
    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date recheckTime;
    private Long recheckUserId;
}
